#include <stdio.h>
#include <string.h>

void extractNumbers(char *str, int *arr, int *size) {
    int count = 0;
    for (int i = 0; i < strlen(str); i++) {
        if (str[i] >= '0' && str[i] <= '9') {
            arr[count] = str[i] - '0';
            count++;
        }
    }
    *size = count;
}

int main() {
    char str[] = "Hello123World456";
    int arr[100];
    int size;

    extractNumbers(str, arr, &size);

    printf("Extracted numbers: ");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }
    printf("\n");

    return 0;
}
